/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package verins.beans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author miguel
 */
@Embeddable
public class PermisoxrolPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idrol", nullable = false)
    private int idrol;
    @Basic(optional = false)
    @Column(name = "idpermiso", nullable = false)
    private int idpermiso;

    public PermisoxrolPK() {
    }

    public PermisoxrolPK(int idrol, int idpermiso) {
        this.idrol = idrol;
        this.idpermiso = idpermiso;
    }

    public int getIdrol() {
        return idrol;
    }

    public void setIdrol(int idrol) {
        this.idrol = idrol;
    }

    public int getIdpermiso() {
        return idpermiso;
    }

    public void setIdpermiso(int idpermiso) {
        this.idpermiso = idpermiso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idrol;
        hash += (int) idpermiso;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PermisoxrolPK)) {
            return false;
        }
        PermisoxrolPK other = (PermisoxrolPK) object;
        if (this.idrol != other.idrol) {
            return false;
        }
        if (this.idpermiso != other.idpermiso) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "verins.beans.PermisoxrolPK[idrol=" + idrol + ", idpermiso=" + idpermiso + "]";
    }

}
